@extends('admin.layouts.master')

@section('content')

<div class="row aw-list">
	<div class="col-md-12 aw-list-head aw-list-tab Js-list-tab">
		<a class="btn btn-gray" v-on:click="Click_Tab(1)"><i class="icon-file-text-alt"></i> 基本信息</a>
		<a class="btn btn-gray" v-on:click="Click_Tab(2)"><i class="icon-group"></i> 队员信息</a>
		<a class="btn btn-gray" v-on:click="Click_Tab(3)"><i class="icon-retweet"></i> 对战记录</a>
		<a class="btn btn-gray" v-on:click="Click_Tab(4)"><i class="icon-thumbs-up"></i> 对手评价</a>
	</div>
	<div class="col-md-12">
		<section class="panel aw-content">
		<!--基本信息-开始-->
		<div class="Js-tab-li aw-hide" data-tab="1">	
			<header class="panel-heading">基本信息</header>
			<div class="form-group overflow-hidden"></div>
			<div class="form-group overflow-hidden aw-team-imgs">
				<div class="aw-team-img"><img :src="info.img ? info.img : '/img/default_160_160.png'" onerror="javascript:this.src='/img/default_160_160.png';"></div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">球队名称：@{{info.name}}</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">队长：@{{info.admin_name}}</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">平均年龄：@{{info.avg_age}}岁</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">球队人数：@{{info.people_number}}人</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">球队主色：@{{info.colour}}</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">成立时间：@{{info.create_time}}</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">队长手机号：@{{info.admin_phone}}</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">完成比赛：@{{info.game_number}}次</div>
				<div class="col-sm-6 col-md-4 col-lg-3 aw-ptb10">靠谱率：@{{info.win_rate}}%</div>
			</div>
			<header class="panel-heading">球队介绍</header>
			<div class="form-group overflow-hidden"></div>
			<div class="col-sm-12 overflow-hidden">@{{info.desc}}</div>
			<div class="form-group overflow-hidden"></div>
		</div>
		<!--基本信息-结束-->
		<!--队员信息-开始-->
		<div class="Js-tab-li aw-hide" data-tab="2">
			<header class="panel-heading aw-mt10">队员信息</header>
			<table class="table table-striped dataTable table-hover">
				<thead>
					<tr>
						<th>头像</th>
						<th>昵称</th>
						<th>手机号</th>
					</tr>
				</thead>
				<tbody>
					<tr v-for="(list, key) in member_list" :data-key="key" :data-id="list.id">
						<td><img style="width:40px;height:40px;" :src="info.img ? info.img : '/img/default_160_160.png'" onerror="javascript:this.src='/img/default_160_160.png';"></td>
						<td style="vertical-align: middle;">@{{list.nickname}}</td>
						<td style="vertical-align: middle;">@{{list.phone}}</td>
					</tr>
				</tbody>
			</table>
			<div class="aw-text-center aw-list-null aw-show" v-if="member_list.length==0">暂无数据</div>
		</div>
		<!--队员信息-结束-->
		<!--对战记录-开始-->
		<div class="Js-tab-li aw-hide" data-tab="3">
			<header class="panel-heading aw-mt10">对战记录</header>
			<table class="table table-striped dataTable table-hover">
				<thead>
					<tr>
						<th>订单编号</th>
						<th>主队</th>
						<th>客队</th>
						<th>比赛时间</th>
						<th>比赛地点</th>
					</tr>
				</thead>
				<tbody>
					<tr v-for="(list, key) in lists" :data-key="key" :data-id="list.id">
						<td>@{{list.order_id}}</td>
						<td>@{{list.main_team}}</td>
						<td>@{{list.slave_team_name}}</td>
						<td>@{{list.time}}</td>
						<td>@{{list.storefront_name}}</td>
					</tr>
				</tbody>
			</table>
			<div class="aw-text-center aw-list-null" v-if="lists.length==0">暂无数据</div>
			<vue-page :page_item="page_item" :page_this="page_this" :page_all="page_all" :Call_back="Call_back"></vue-page>
		</div>
		<!--对战记录-结束-->
		<!--对手评价-开始-->
		<div class="Js-tab-li aw-hide" data-tab="4">
			<header class="panel-heading aw-mt10">对手评价</header>
			<div class="col-sm-12 aw-p0 overflow-hidden">
				<ul class="aw-team-comment-list">
					<li class="aw-team-comment-li" v-for="(list, key) in comment_list">
						<div class="aw-text-left">@{{list.content}}</div>
						<div class="aw-text-right">@{{list.content_num}}</div>
					</li>
				</ul>
			</div>
			<div class="aw-text-center aw-list-null aw-show" v-if="comment_list.length==0">暂无数据</div>
		</div>
		<!--对手评价-结束-->
		</section>
	</div>
</div>

@section('pagejs')
@parent

<script type="text/javascript" src="/admin/js/vue-page.js"></script>
<script type="text/javascript" src="/admin/js/page.js"></script>
<script type="text/javascript">
var MJS_URLArry=URLArry;
var Get_form={
	page_id:5,tab:1
}
$.extend(Get_form,MJS_URLArry);
var AD_info={
	api:'/adminapi/team/info',
	form_data:Get_form,
	tips:false,
}
var AD_list={
	api:'/adminapi/team/orders',
	form_data:Get_form,
	tips:false,
}
var Ajax_Vue_Fun_List=function(vue_data){
	console.log('vue_data')
	console.log(vue_data)
	var Data_Vue=ajax_data_res(vue_data)
	Data_Vue.info={};
	Data_Vue.comment_list={};
	Data_Vue.member_list={};
	vm=new Vue({
		el:'#Vue-Body',
		data:Data_Vue,
		components:{
			'vue-page':Vpage
		},methods:{
			Call_back:function(page){
				Vm_Call_back_Page(page)
			},Click_Tab:function(tab){
				$('.Js-list-tab a').removeClass('btn-gules')
                $('.Js-list-tab a').eq(tab-1).addClass('btn-gules')
				$('.Js-tab-li').removeClass('aw-show')
				$('.Js-tab-li[data-tab="'+tab+'"]').addClass('aw-show')
				AD_List_Edit('tab',tab)
				URL_Make(AD_list.form_data)
			}
		}
	})
	vm.Click_Tab(1)
	getData(AD_info,Ajax_Vue_Fun_Info)
	URL_Make(Get_form)
}
var Ajax_Vue_Fun_Info=function(vue_data){
	vm.info=vue_data.base_info;
	vm.comment_list=vue_data.comment_list;
	vm.member_list=vue_data.member_list;
}
if(Get_form.id>0){
	getData(AD_list,Ajax_Vue_Fun_List)
}else{
	location.href='/admin/team/list?page_id=5';
}
</script>
@endsection

@endsection

